Allow plugins get vis embeddable to show in flyouts#4250
Allow plugins get vis embeddable to show in flyouts#4250joshuarrrr merged 2 commits intoopensearch-project:feature/feature-anywherefrom
Conversation
Signed-off-by: Ashish Agrawal <ashisagr@amazon.com>
| await embeddable.populateVisLayers(); | ||
|
|
||
| const embeddable = await fetchVisEmbeddable(savedObjectId); | ||
| setTimeRange(embeddable.timeRange); |
There was a problem hiding this comment.
For consistency, could we force this to be the same as it was before?
setTimeRange(getQueryService().timefilter.timefilter.getTime());
this means we don't have to make the private field public in embeddable as well. Plus if we move away from embeddables altogether, we will inevitably have to make this change.
Signed-off-by: Ashish Agrawal <ashisagr@amazon.com>
Codecov Report
@@ Coverage Diff @@
## feature/feature-anywhere #4250 +/- ##
=========================================================
Coverage 26.39% 26.39%
=========================================================
Files 150 150
Lines 3554 3554
Branches 407 407
=========================================================
Hits 938 938
Misses 2592 2592
Partials 24 24
Flags with carried forward coverage won't be shown. Click here to find out more. |
| } | ||
|
|
||
| embeddable.updateInput({ | ||
| // @ts-ignore |
There was a problem hiding this comment.
nit - all @ts-ignore statements should have explanatory comments. I'm also curious why it's necessary here - is it because you're just passing a partial input?
There was a problem hiding this comment.
This was existing code moved here. The reason for the ignore here is that the embeddable is within a dashboard container that controls a refreshConfig field - this isn't included as part of the default embeddableInput that it resolves to, so IDEs complain about it
There was a problem hiding this comment.
can you either add that to a comment or open an issue?
Description
Allow plugins get vis embeddable to show in flyouts.
This prevents plugins from using the current embeddable object to show in the flyout as the breaks functionality in the main dashboard visualization.
Issues Resolved
This prevents plugins from using the current embeddable object to show in the flyout as the breaks functionality in the main dashboard visualization.
Check List
yarn test:jestyarn test:jest_integrationyarn test:ftr